from rest_framework.routers import DefaultRouter
from .views import *
# 2. 实例化DefaultRouter
router = DefaultRouter()
# 3. 注册应用url
router.register('students',SchoolViewset,basename='students')
router.register('grades',GradeViewset,basename='grades')
router.register('classes',ClassBjViewset,basename='classes')
router.register('subjects',SubjectViewset,basename='subjects')
router.register('nations',NationViewset,basename='nations')
router.register('politicalclimates',PoliticalClimateViewset,basename='politicalclimates')

urlpatterns = [

]
#4.附加
urlpatterns += router.urls